{include file='public/head'}
{load href='/static/css/register.css'}
    <fieldset>
        <legend>欢迎注册</legend>
        <form id='fm' action='' method='post'>
        <p>
            手&nbsp;&nbsp;&nbsp;机: <input type="text" name="phone"  value='' placeholder='请输入注册手机'>
        </p>
        <p>
            密&nbsp;&nbsp;&nbsp;码: <input type="password"  name="pwd"  value=''>
        </p>
        <p>
            确认密码:<input type="password" name='pwd_confirm'>
        </p>
        <p>
            密保问题: <select name='question'>
                <option value="">默认没有</option>
                <option value="家在哪里?">家在哪里?</option>
                <option value="班主任姓名?">班主任姓名?</option>
                <option value="授业教师姓名?">授业教师姓名?</option>
            </select>
        </p>
        <p>
            答&nbsp;&nbsp;&nbsp;案: <input type="text"  name="answer" value='' placeholder='请输入密保问题答案'>
        </p>
        <p>
            验证码: <input type="text" name='code'><img id='code' src="{:captcha_src()}">
        </p>
        <p>
            <input type="submit" value='注册'>
            <a href="/index/login/index">已有账号?直接登录!</a>
        </p>
        </form>
    </fieldset>
    <script type="text/javascript">
   /*$('#fm').validate({
        rules:{
            phone:{
                isPhone:true,
                required:true,
                remote:'/static/check.php',
            },
            pwd:{
                maxlength:16,
                minlength:3,
                required:true,
            },
            okpwd:{
                required:true,
                equalTo:"input[name=pwd]",
            },
        },
        messages:{
            phone:{required:'必填',},
            pwd:{required:'必填',maxlength:'最大16个字符',minlength:'最小3个字符'},
            okpwd:{required:'必填',equalTo:'与密码填写不一致'},
        },
        submitHandler:function(from){
            $(from).ajaxSubmit({
                type:'post',
                url:'/static/ajax.php',
                dataType:'text',
                success:function(res){
                    if(res == 1){
                        alert('注册成功');
                    }else{
                        alert('注册失败');
                    }
                }
            });
        }
   });*/
   $('#code').click(function(){
        $(this).attr('src','{:captcha_src()}?t='+Math.random())
   })
</script>
</body>
</html>
